#!/bin/bash
input_dir_tra=/home/yjy/PycharmProjects/HRNet-Facial-Landmark-Detection/data/casia/images/train
input_dir_test=/home/yjy/PycharmProjects/HRNet-Facial-Landmark-Detection/data/casia/images/test
output_dir_tra=/home/yjy/PycharmProjects/HRNet-Facial-Landmark-Detection/data/casia
output_dir_test=/home/yjy/PycharmProjects/HRNet-Facial-Landmark-Detection/data/casia

files=`ls "$input_dir_tra"`
for filename in $files; do
        person_id=`expr substr "$filename" 1 4`
        echo "....................generating "$filename
        echo $filename" "$person_id >> $output_dir_tra/train_dprime.txt
done

files=`ls "$input_dir_test"`
for filename in $files; do
        person_id=`expr substr "$filename" 1 4`
        echo "....................generating "$filename
        echo $filename" "$person_id >> $output_dir_test/test_dprime.txt
done
